//
//  JigSawMetaView.h
//  JigSawKiosk
//
//  Created by Stulberg on 10-10-17.
//  Copyright 2010 FruitonLabs. All rights reserved.
//
// A NSView that goes full screen and holds subviews
// Acts somewhat as the controller


#import <Cocoa/Cocoa.h>

@class JigSawBackgroundFrameView, JigSawFullScreenMovieView, JigSawButtonContainerView, JigSawMainMovieView, JigSawFeedbackView ;
@class DIVARequest, ArduinoCom ;

#import "JigSawMouseView.h"
#import "JigSawMovieButton.h"

@interface JigSawMetaView : NSView {

	JigSawFullScreenMovieView *fsMovieView ;
	
	JigSawBackgroundFrameView *backgroundFrame ;
		
	// main movie
	JigSawMainMovieView *mainMovieView ;
	
	// button container
	JigSawButtonContainerView *buttonContainer ;
	
	
	// feedback
	JigSawFeedbackView *feedbackView ;
	
	
	// Diva request
	DIVARequest *dvr ;
	
	ArduinoCom *arduino ;
	
	NSMutableArray *movieURLArray ;
	NSMutableArray *previewURLArray ;
	NSMutableArray *movieNameArray ;
	
	NSURL *introMovieURL ;
	NSURL *defaultMovieURL ;
	
	NSTimer *inactivityTimer ;
	
	NSTimer *transitionTimer ;
	
	int currentKioskMode ;
	
	JigSawMouseView *aMouse ;
	CGPoint mouseLocation ;
	CGPoint hitPoint ;
}

@property (nonatomic, retain) JigSawFullScreenMovieView *fsMovieView ;

@property (nonatomic, retain) JigSawBackgroundFrameView *backgroundFrame ;

@property (nonatomic, retain) JigSawMainMovieView *mainMovieView ;

@property (nonatomic, retain) JigSawButtonContainerView *buttonContainer ;

@property (nonatomic, retain) JigSawFeedbackView *feedbackView ;

@property (nonatomic, retain) ArduinoCom *arduino ;

@property (nonatomic, retain) DIVARequest *dvr ;

@property (nonatomic, retain) JigSawMouseView *aMouse ;

-(void) setupViews ;

- (void) toggleFullScreen ;

-(void) switchView:(NSView*)view previous:(NSView*)previousView  ;

- (void) getMovieLocators ;

- (void) inactivityTimerMethod:(NSTimer*)timer ;
- (void) resetInactivityTimer ;
- (void) stopInactivityTimer ;

- (void) transitionTimerMethod:(NSTimer*) timer ;
- (void) startTransitionTimer:(float) withDuration ;

//set globals from configuration plist
- (void) populateConfiguration;

@end
